<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateNavigationsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('navigations', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('category')->comment('导航分类');
			$table->string('type')->comment('类型');
			$table->string('title', 100)->comment('标题');
			$table->string('description')->nullable()->comment('描述');
			$table->string('target')->default('_self')->comment('是否新建标签');
			$table->string('link')->nullable()->comment('URL');
			$table->string('image')->nullable()->comment('图片');
			$table->string('icon')->nullable()->comment('图标');
			$table->integer('parent')->comment('父id');
			$table->string('path')->comment('路径');
			$table->text('params', 65535)->comment('参数');
			$table->string('is_show')->default('1')->comment('是否显示');
			$table->integer('order')->comment('排序');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('navigations');
	}

}
